<%-- 
    Document   : validasi_akademik
    Created on : Feb 4, 2014, 2:45:57 PM
    Author     : Muhammad Dony
--%>

<%@page import="java.util.List"%>
<%@page import="data.AkademikData"%>
<%@page import="database.AkademikDB"%>
<%@include file="../Admin/header_admin.jsp" %>
<script src="res/js/jquery.dataTables.js"></script>
<script src="res/js/bootstrap.dataTables.js"></script>
<link href="res/css/dataTables.css" type="text/css"/>
<style>.pagination{margin:0}</style>
<div class="row">
    <div class="col-lg-6 col-lg-push-1">
        <table id="table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
            <thead>
            <tbody>
            <th>No</th>
            <th>Semester</th>
            <th>IPS</th>
            <th>IPK</th>
            <th>Status</th>
            <th>Validasi</th>
            <th>Tolak Validasi</th>
            </thead>
            <tbody>
                <%
                    List listakademik = (List) request.getAttribute("listakademik");
                    int n = 1;                  
                %>
                <% for (int i = 0; i < listakademik.size(); i++) {
                        AkademikData data1 = (AkademikData) listakademik.get(i);

                %>
                <tr>
                    <td><%=n++%></td>
                    <td><%=data1.getSemester()%></td>
                    <td><%=data1.getIPS()%></td>
                    <td><%=data1.getIPK()%></td>
                    <% if (data1.getStatus().equals("1")) { %>
                    <td><i class="glyphicon glyphicon-ok"></i> Tervalidasi</td>
                    <% } else if (data1.getStatus().equals("0")) { %>
                    <td><i class="glyphicon glyphicon-warning-sign"></i> Belum Tervalidasi</td>
                    <% } else if(data1.getStatus().equals("x")) { %>
                    <td><i class="glyphicon glyphicon-remove"></i> Tidak Tervalidasi</td>
                    <% } %>
                     <td>
                        <form  action="Validasi_akademik" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="1" />
                            <input type="submit" class="btn btn-primary" name="action" value="valid">
                        </form>
                    </td> 
                    <td>
                        <form  action="Validasi_akademik" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="x" />
                            <input type="submit" class="btn btn-danger" name="action" value="tolak">
                        </form>
                    </td>  
                </tr>
                <% }%>
            </tbody>
        </table>
    </div>
</div>
<%@include file="../Admin/footer_admin.jsp" %>